package com.junchao.peng.pojo;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @author dell
 */
public class Session implements Serializable {

    private static final long serialVersionUID = 1L;

    private String session;
    private String content;
    private String title;
    private String sponsor;
    private String meetIdea;
    private String meetStatus;
    private Integer number;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    public Session(String session, String content, String title, String sponsor, String meetIdea, String meetStatus, Integer number, Date startTime, Date endTime) {
        this.session = session;
        this.content = content;
        this.title = title;
        this.sponsor = sponsor;
        this.meetIdea = meetIdea;
        this.meetStatus = meetStatus;
        this.number = number;
        this.startTime = startTime;
        this.endTime = endTime;
    }

    public Session() {
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSponsor() {
        return sponsor;
    }

    public void setSponsor(String sponsor) {
        this.sponsor = sponsor;
    }

    public String getMeetIdea() {
        return meetIdea;
    }

    public void setMeetIdea(String meetIdea) {
        this.meetIdea = meetIdea;
    }

    public String getMeetStatus() {
        return meetStatus;
    }

    public void setMeetStatus(String meetStatus) {
        this.meetStatus = meetStatus;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Session)) return false;
        Session session1 = (Session) o;
        return getSession().equals(session1.getSession()) && getContent().equals(session1.getContent()) && getTitle().equals(session1.getTitle()) && getSponsor().equals(session1.getSponsor()) && getMeetIdea().equals(session1.getMeetIdea()) && getMeetStatus().equals(session1.getMeetStatus()) && getNumber().equals(session1.getNumber()) && getStartTime().equals(session1.getStartTime()) && getEndTime().equals(session1.getEndTime());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getSession(), getContent(), getTitle(), getSponsor(), getMeetIdea(), getMeetStatus(), getNumber(), getStartTime(), getEndTime());
    }

    @Override
    public String toString() {
        return "Session{" +
                "session='" + session + '\'' +
                ", content='" + content + '\'' +
                ", title='" + title + '\'' +
                ", sponsor='" + sponsor + '\'' +
                ", meetIdea='" + meetIdea + '\'' +
                ", meetStatus='" + meetStatus + '\'' +
                ", number=" + number +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                '}';
    }
}
